<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.grandpa{
				width: 300px;
				height: 300px;
				border: 1px solid grey;
			}
		</style>
		<script src="js/jquery-3.4.1.min.js"></script>
	</head>
	<body>
		<div class="grandpa">div
		  <p class="aa">儿子
		    <span>孙子</span>     
		  </p>
		  <p class="bb">儿子
		    <span>孙子</span>
		  </p> 
		</div>
		
		<!-- 
		 children只可选到儿子
		 find可选到所有后代
		 -->
		<script>
			// $(".grandpa").children().css("border","2px solid red");
			// $(".grandpa").children("p.aa").css("color","red");
			$(".grandpa").children(":first").css("color","red");
			// $(".grandpa").find("span").css("border","2px solid red");
		</script>
	</body>
</html>
